package start;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.Lifecycle;

class A implements I,InitializingBean,DisposableBean {
    private String name;
    public A() {
        System.out.println("Constructor:"+this.getClass().getCanonicalName()+"="+this);
    }
    @Override
    public void afterPropertiesSet() {
        System.out.println(this+":      afterPropertiesSet()");
    }
    public void init_method() {
        System.out.println(this+":      init_method()");
    }
    @Override
    public void destroy() {
        System.out.println(this+":      destroy(");
    }
    public void destroy_method() {
        System.out.println(this+":      destroy_method(");
    }

    public void setName(String name) {
        System.out.println(this+":      setName("+name+")");
        this.name = name;
    }

    public String getName() {
        System.out.println(this+":      getName()="+name);
        return name;
    }


}
